<?php
// ----- >> Extends From Template
class thisPDF extends PDF{
	function Header(){}
	function Footer(){}
}


// ----- >> Init
$fpdf = new thisPDF('P','mm','A4');
$fpdf->AddPage();
$fpdf->SetLeftMargin(8);

$fpdf->Ln(0);
$ln_header_y_top	= $fpdf->GetY();


// ----- >> Header
$fpdf->Ln(2);

$fpdf->SetFont('Arial','B',14);
$fpdf->Cell(0,5,"Laporan Perangkat",0,1,'C');

$fpdf->Ln(10);



// ----- >> Data Master
$fpdf->SetFont('Arial','',10);
$fpdf->Cell(20,5,"Kode Barang",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['kode_barang'],0,0,'L');


$fpdf->SetFont('Arial','',10);
$fpdf->Cell(20,5,"Nama Barang",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['nama_barang'],0,1,'L');



$fpdf->SetFont('Arial','',10);
$fpdf->Cell(20,5,"Nama Merek",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['nama_merek'],0,1,'L');

$fpdf->Cell(20,5,"Spesifikasi",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['spesifikasi'],0,1,'L');



$fpdf->SetFont('Arial','',10);
$fpdf->Cell(20,5,"Kondisi Barang",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(60,5,$data['kondisi'],0,1,'L');

$fpdf->Cell(20,5,"Tipe",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['tipe'],0,1,'L');

$fpdf->SetFont('Arial','',10);
$fpdf->Cell(20,5,"Harga",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['harga'],0,1,'L');

$fpdf->Cell(20,5,"Jumlah",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['jumlah'],0,1,'L');

$fpdf->Cell(20,5,"Keterangan",0,0,'L');
$fpdf->Cell(2,5,":",0,0,'L');
$fpdf->Cell(20,5,$data['keterangan'],0,1,'L');






echo $fpdf->Output('CetakSample.pdf', 'I');
exit();
?>